package xyz.icxl.kotlion.ext.primitives


/**
 * Boolean 值的执行业务
 */
fun Boolean?.runBusiness(runFalse: () -> Unit = {}, runTrue: () -> Unit = {}): Boolean {
    return if (this != null && this == true) {
        runTrue()
        true
    } else {
        runFalse()
        false
    }
}